package com.avecsys.quotemanager.dao.buyer;

import java.util.List;

import com.avecsys.quotemanager.dao.common.BaseDAO;
import com.avecsys.quotemanager.exception.DAOException;
import com.avecsys.quotemanager.pojos.BuyerMasterPojo;
import com.avecsys.quotemanager.pojos.SupplierMasterPojo;
import com.avecsys.quotemanager.utils.TransactionStatus;

public interface BuyerMasterDAO extends BaseDAO
{

	/**
	 * Method to save Buyer Information
	 * 
	 * @param buyerMasterPojo - Object representing the buyer details
	 * @return TransactionStatus
	 * @throws DAOException
	 */
	public TransactionStatus saveBuyer(final BuyerMasterPojo buyerMasterPojo) throws DAOException;

	/**
	 * Method to update Buyer Information
	 * 
	 * @param buyerMasterPojo - Object representing the buyer details
	 * @return TransactionStatus
	 * @throws DAOException
	 */
	public TransactionStatus updateBuyer(final BuyerMasterPojo buyerMasterPojo) throws DAOException;

	/**
	 * Method to mark supplier information and supplier users information as deleted
	 * 
	 * @param supplierMasterPojo
	 * @return TransactionStatus
	 * @throws DAOException
	 */
	public TransactionStatus deleteBuyer(final BuyerMasterPojo buyerMasterPojo) throws DAOException;

	/**
	 * Method to return all Active Buyers who belong to a Supplier
	 * 
	 * @param supplierMasterPojo
	 * @return List<BuyerMasterPojo>
	 */
	List<BuyerMasterPojo> findAllSupplierBuyers(SupplierMasterPojo supplierMasterPojo)
			throws DAOException;
}
